package cn.hsa.xxx.bookOrder.service.impl;

import cn.hsa.hsaf.core.framework.web.HsafRestPath;
import cn.hsa.xxx.bookOrder.bo.OrderBO;
import cn.hsa.xxx.bookOrder.dto.OrderDTO;
import cn.hsa.xxx.bookOrder.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@HsafRestPath("/api/px/order")
@Service("orderService")
@Slf4j
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderBO orderBO;

    @Override
    public OrderDTO add(OrderDTO orderDTO) {
        return orderBO.add(orderDTO);
    }

    @Override
    public String delete(String id) {
        return orderBO.delete(id);
    }

    @Override
    public OrderDTO get(String id) {
        return orderBO.get(id);
    }

    @Override
    public String update(OrderDTO orderDTO) {
        return orderBO.update(orderDTO);
    }

    @Override
    public List<OrderDTO> getPage(int pageNo, int pageSize) {
        return orderBO.getPage(pageNo,pageSize);
    }
}
